<?php
require_once "absence.php";

$wt = array(
     "checkTime" => "08:00:00",
     "absenceInBegin" => "06:00:00",
     "absenceInEnd" => "09:00:00",
     "absenceOutBegin" => "17:15:00",
     "absenceOutEnd" => "18:15:00",
     "lateTimeTolerance" => "09:30:00",
     "leaveTimeTolerance" => "20:00:00",
   );

$absence = new Absence($wt);

if ($absence->isAbsenceIn()) {
   echo "Anda MENGIKUTI aturan absen masuk\n";
} else {
   echo "Anda TIDAK MENGIKUTI aturan absen masuk\n";
}

echo "\n";

if ($absence->isAbsenceOut()) {
   echo "Anda MENGIKUTI aturan absen pulang / keluar \n";
} else {
   echo "Anda TIDAK MENGIKUTI aturan absen pulang / keluar \n";
}

if ($absence->isComeLate()) {
   echo "Ya anda telat!!!\n";
} else {
   echo "Anda kelihatan fresh pagi ini! anda tepat waktu!\n";
}

if ($absence->isLeaveEarly()) {
   echo "Anda pulang cepat / lebih awal\n";
} else {
   echo "Anda pulang sesuai waktu yg ditentukan\n";
}
